import QtQuick 1.1
import com.nokia.meego 1.1
import StarMenu 1.0

Item {

    StarMenu {
        id: starMenu
        objectName: "Menu7-1"
        anchors.fill: parent
        starCenterVisible: true
        visualParent: main
        color: Qt.rgba(0.0,0.0,0, 0.5)
        shape: StarMenu.ShapeLine
        startingRadius: 0
        radiusIncrement: 0
        startingAngle: 20
        center.x: main.width>>1
        center.y: main.height>>1

        onStarMenuOpening: {textRect.text =
           "<font size=4>Here StarMenu with a line shape.<br>"+
           "This shape owns a <strong>startingAngle</strong>, <strong>radiusIncrement</strong> and <strong>startingRadius</strong> properties.<br>";
            textRect.z = starMenu.z;
        }

        Column {
            id: controls
            visible: starMenu.open
            x: 0
            y: main.height-controls.height
            z: main.z+1

            Row {
                Text {
                    text: "Starting Angle"
                    font {bold: true; pixelSize: 30}
                    color: "#ffffff"
                }
                Slider {
                    valueIndicatorVisible: true
                    minimumValue:0; maximumValue:360; width:350
                    Component.onCompleted: value = starMenu.startingAngle
                    onValueChanged: starMenu.startingAngle = value
                }
            }
            Row {
                Text {
                    text: "Radius increment"
                    font {bold: true; pixelSize: 30}
                    color: "#ffffff"
                }
                Slider {
                    valueIndicatorVisible: true
                    minimumValue:0; maximumValue:100; width:350
                    Component.onCompleted: value = starMenu.radiusIncrement
                    onValueChanged: starMenu.radiusIncrement = value
                }
            }
            Row {
                Text {
                    text: "Starting radius"
                    font {bold: true; pixelSize: 30}
                    color: "#ffffff"
                }
                Slider {
                    valueIndicatorVisible: true
                    minimumValue:-400; maximumValue:400; width:350
                    Component.onCompleted: value = starMenu.startingRadius
                    onValueChanged: starMenu.startingRadius = value
                }
            }
        }


        StarItem {
            width: 50; height: 50

            Image {
                anchors.fill: parent; smooth: true
                fillMode: Image.Stretch
                source: "0001.png"
            }
        }
        StarItem {
            width: 100; height: 100

            Image {
                anchors.fill: parent; smooth: true
                fillMode: Image.Stretch
                source: "0002.png"
            }
        }
        StarItem {
            width: 64; height: 64

            Image {
                anchors.fill: parent; smooth: true
                fillMode: Image.Stretch
                source: "0003.png"
            }
        }
        StarItem {
            width: 48; height: 48

            Image {
                anchors.fill: parent; smooth: true
                fillMode: Image.Stretch
                source: "qt.png"
            }


            StarMenu {
                id: starMenu2
                objectName: "Menu7-2"
                anchors.fill: parent;
                starCenterVisible: false
                shape: StarMenu.ShapeLine
                delayChangePos: 100
                startingRadius: 50
                radiusIncrement: 0
                startingAngle: 90

                StarItem {
                    objectName: "STAR1"
                    width: 48; height: 48
                    zoomHoverValue: 1.5
                    Behavior on x  { NumberAnimation { duration: 1000; easing.type: Easing.OutBounce } }
                    Behavior on y  { NumberAnimation { duration: 1000; easing.type: Easing.OutBounce } }
                    Behavior on opacity  { NumberAnimation { duration: 1000; easing.type: Easing.OutBounce } }
                    Behavior on scale  { NumberAnimation { duration: 500; easing.type: Easing.OutQuad } }

                    Image {
                        anchors.fill: parent; smooth: true
                        fillMode: Image.Stretch
                        source: "0007.png"
                    }
                }
                StarItem {
                    objectName: "STAR2"
                    width: 48; height: 48
                    zoomHoverValue: 1.5
                    Behavior on x  { NumberAnimation { duration: 1000; easing.type: Easing.OutBounce } }
                    Behavior on y  { NumberAnimation { duration: 1000; easing.type: Easing.OutBounce } }
                    Behavior on opacity  { NumberAnimation { duration: 1000; easing.type: Easing.OutBounce } }
                    Behavior on scale  { NumberAnimation { duration: 500; easing.type: Easing.OutQuad } }

                    Image {
                        anchors.fill: parent; smooth: true
                        fillMode: Image.Stretch
                        source: "0006.png"
                    }
                }
                StarItem {
                    width: 48; height: 48
                    zoomHoverValue: 1.5
                    Behavior on x  { NumberAnimation { duration: 1000; easing.type: Easing.OutBounce } }
                    Behavior on y  { NumberAnimation { duration: 1000; easing.type: Easing.OutBounce } }
                    Behavior on opacity  { NumberAnimation { duration: 1000; easing.type: Easing.OutBounce } }
                    Behavior on scale  { NumberAnimation { duration: 500; easing.type: Easing.OutQuad } }

                    Image {
                        anchors.fill: parent; smooth: true
                        fillMode: Image.Stretch
                        source: "qt.png"
                    }


                    StarMenu {
                        id: starMenu3
                        objectName: "Menu7-2"
                        anchors.fill: parent;
                        starCenterVisible: false
                        shape: StarMenu.ShapeLine
                        delayChangePos: 100
                        startingRadius: 50
                        radiusIncrement: 0
                        startingAngle: 180

                        StarItem {
                            objectName: "STAR1"
                            width: 48; height: 48
                            zoomHoverValue: 1.5
                            Behavior on x  { NumberAnimation { duration: 1000; easing.type: Easing.OutBounce } }
                            Behavior on y  { NumberAnimation { duration: 1000; easing.type: Easing.OutBounce } }
                            Behavior on opacity  { NumberAnimation { duration: 1000; easing.type: Easing.OutBounce } }
                            Behavior on scale  { NumberAnimation { duration: 500; easing.type: Easing.OutQuad } }

                            Image {
                                anchors.fill: parent; smooth: true
                                fillMode: Image.Stretch
                                source: "0007.png"
                            }
                        }
                        StarItem {
                            objectName: "STAR2"
                            width: 48; height: 48
                            zoomHoverValue: 1.5
                            Behavior on x  { NumberAnimation { duration: 1000; easing.type: Easing.OutBounce } }
                            Behavior on y  { NumberAnimation { duration: 1000; easing.type: Easing.OutBounce } }
                            Behavior on opacity  { NumberAnimation { duration: 1000; easing.type: Easing.OutBounce } }
                            Behavior on scale  { NumberAnimation { duration: 500; easing.type: Easing.OutQuad } }

                            Image {
                                anchors.fill: parent; smooth: true
                                fillMode: Image.Stretch
                                source: "0006.png"
                            }
                        }
                        StarItem {
                            objectName: "STAR3"
                            width: 48; height: 48
                            zoomHoverValue: 1.5
                            Behavior on x  { NumberAnimation { duration: 1000; easing.type: Easing.OutBounce } }
                            Behavior on y  { NumberAnimation { duration: 1000; easing.type: Easing.OutBounce } }
                            Behavior on opacity  { NumberAnimation { duration: 1000; easing.type: Easing.OutBounce } }
                            Behavior on scale  { NumberAnimation { duration: 500; easing.type: Easing.OutQuad } }

                            Image {
                                anchors.fill: parent; smooth: true
                                fillMode: Image.Stretch
                                source: "0014.png"
                            }
                        }
                        StarItem {
                            objectName: "STAR3.5"
                            width: 48; height: 48
                            zoomHoverValue: 1.5
                            Behavior on x  { NumberAnimation { duration: 1000; easing.type: Easing.OutBounce } }
                            Behavior on y  { NumberAnimation { duration: 1000; easing.type: Easing.OutBounce } }
                            Behavior on opacity  { NumberAnimation { duration: 1000; easing.type: Easing.OutBounce } }
                            Behavior on scale  { NumberAnimation { duration: 500; easing.type: Easing.OutQuad } }

                            Image {
                                anchors.fill: parent; smooth: true
                                fillMode: Image.Stretch
                                source: "0010.png"
                            }
                        }
                    }
                }
                StarItem {
                    objectName: "STAR3"
                    width: 48; height: 48
                    zoomHoverValue: 1.5
                    Behavior on x  { NumberAnimation { duration: 1000; easing.type: Easing.OutBounce } }
                    Behavior on y  { NumberAnimation { duration: 1000; easing.type: Easing.OutBounce } }
                    Behavior on opacity  { NumberAnimation { duration: 1000; easing.type: Easing.OutBounce } }
                    Behavior on scale  { NumberAnimation { duration: 500; easing.type: Easing.OutQuad } }

                    Image {
                        anchors.fill: parent; smooth: true
                        fillMode: Image.Stretch
                        source: "0014.png"
                    }
                }
                StarItem {
                    objectName: "STAR3.5"
                    width: 48; height: 48
                    zoomHoverValue: 1.5
                    Behavior on x  { NumberAnimation { duration: 1000; easing.type: Easing.OutBounce } }
                    Behavior on y  { NumberAnimation { duration: 1000; easing.type: Easing.OutBounce } }
                    Behavior on opacity  { NumberAnimation { duration: 1000; easing.type: Easing.OutBounce } }
                    Behavior on scale  { NumberAnimation { duration: 500; easing.type: Easing.OutQuad } }

                    Image {
                        anchors.fill: parent; smooth: true
                        fillMode: Image.Stretch
                        source: "0010.png"
                    }
                }
            }
        }



        StarItem {
            width: 64; height: 64

            Image {
                anchors.fill: parent; smooth: true
                fillMode: Image.Stretch
                source: "0005.png"
            }
        }
        StarItem {
            width: 48; height: 48

            Image {
                anchors.fill: parent; smooth: true
                fillMode: Image.Stretch
                source: "0006.png"
            }
        }
    }
}
